-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[CIR] Fix failing lit test (statement-exprs.c) #167000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This fixes a test case in the clang/CIR/CodeGen/statement-exprs.c test. The test case was copied from a similar test in clang/CodeGen/exprs.c and was recently broken by llvm#166036 which corrects Clang's behavior with trailing NullStmts. This change updates the CIR test in the same way that the classic codegen test was updated, removing the trailing null part of the expression.
|
@llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) ChangesThis fixes a test case in the clang/CIR/CodeGen/statement-exprs.c test. The test case was copied from a similar test in clang/CodeGen/exprs.c and was recently broken by #166036 which corrects Clang's behavior with trailing NullStmts. This change updates the CIR test in the same way that the classic codegen test was updated, removing the trailing null part of the expression. Full diff: https://github.com/llvm/llvm-project/pull/167000.diff 1 Files Affected:
diff --git a/clang/test/CIR/CodeGen/statement-exprs.c b/clang/test/CIR/CodeGen/statement-exprs.c
index c784ec9eda7d8..5925515997270 100644
--- a/clang/test/CIR/CodeGen/statement-exprs.c
+++ b/clang/test/CIR/CodeGen/statement-exprs.c
@@ -6,7 +6,7 @@
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
int f19(void) {
- return ({ 3;;4;; });
+ return ({ 3;;4; });
}
// CIR: cir.func dso_local @f19() -> !s32i
|
|
@llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) ChangesThis fixes a test case in the clang/CIR/CodeGen/statement-exprs.c test. The test case was copied from a similar test in clang/CodeGen/exprs.c and was recently broken by #166036 which corrects Clang's behavior with trailing NullStmts. This change updates the CIR test in the same way that the classic codegen test was updated, removing the trailing null part of the expression. Full diff: https://github.com/llvm/llvm-project/pull/167000.diff 1 Files Affected:
diff --git a/clang/test/CIR/CodeGen/statement-exprs.c b/clang/test/CIR/CodeGen/statement-exprs.c
index c784ec9eda7d8..5925515997270 100644
--- a/clang/test/CIR/CodeGen/statement-exprs.c
+++ b/clang/test/CIR/CodeGen/statement-exprs.c
@@ -6,7 +6,7 @@
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
int f19(void) {
- return ({ 3;;4;; });
+ return ({ 3;;4; });
}
// CIR: cir.func dso_local @f19() -> !s32i
|
AmrDeveloper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks
mmha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#166036 removed that semicolon, but it also added a new test. Maybe we should copy that over, too.
The new test there looks a bit dubious. It's only checking that a void return is generated, which doesn't really have anything to do with the expression handling. The AST tells us the return type and sets up the implicit cast to void in this case. It could be interesting to verify that we are emitting code for any sub-expression with side effects, but I think that is covered elsewhere. |
This fixes a test case in the clang/CIR/CodeGen/statement-exprs.c test. The test case was copied from a similar test in clang/CodeGen/exprs.c and was recently broken by llvm#166036 which corrects Clang's behavior with trailing NullStmts. This change updates the CIR test in the same way that the classic codegen test was updated, removing the trailing null part of the expression.
This fixes a test case in the clang/CIR/CodeGen/statement-exprs.c test. The test case was copied from a similar test in clang/CodeGen/exprs.c and was recently broken by #166036 which corrects Clang's behavior with trailing NullStmts. This change updates the CIR test in the same way that the classic codegen test was updated, removing the trailing null part of the expression.